package com.bimiaomiao.service04.web;

import com.bimiaomiao.service04.service.Service01;
import com.bimiaomiao.service04.service.Service02;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:消费类
 * @package com.bimiaomiao.service04.web
 * @who MiaoMiao "Sprout" BI
 * @date 2021-02-22 09:51:23
 */
@RestController
//此服务为应用服务,名字可以随便
@RequestMapping("consumer2")
@EnableFeignClients
public class ConsumerController {
    @Autowired
    Service01 service01;

    @Autowired
    Service02 service02;

    //此服务为应用服务,名字可以随便
    @GetMapping("demo")
    public String demo03()
    {
        String result = service01.demo01();

        String result2 = service02.demo02();

        String aa = result +"||"+ result2;
        return aa;
    }
}
